package main

import "fmt"

func printArray1(myArray []int) {
	// 引用传递
	// _ 表示匿名变量
	for _, value := range myArray {
		fmt.Println("value =", value)
	}
}

func main() {

	myArray := []int{1, 2, 3, 4} // 动态数组，切片 slice

	fmt.Println("myArray tyep is %T\n", myArray)

	printArray1(myArray)

	fmt.Println(" ======= ")

	for _, value := range myArray {
		fmt.Println("value = ", value)
	}

}
